#include <stdio.h>
void sort(int b[], int n)
{
	for (int i = 0; i < n - 1; i ++)
		for (int j = 0; j < n - 1; j ++)
			if (b[j] > b[j + 1])
			{
				int temp;
				temp = b[j];
				b[j] = b[j + 1];
				b[j + 1] = temp;
			}
}
int main()
{
	int a[10] = {5, 0, 6, 8, 3, 2, 9, 1, 4, 7};
	printf("The array before sorting:\n");
	for (int i = 0; i < 10; i ++)
	{
		printf("%d ", a[i]);
	}
	printf("\nThe array after sorting:\n");
	sort(a, 10);
	for (int i = 0; i < 10;  i++)
	{
		printf("%d ", a[i]);
	}
}

